package com.feihong.shop.common.exception;

import com.feihong.shop.common.enums.FeihongHttpStatus;
import org.springframework.http.HttpStatus;

public class FeihongShopBindException extends RuntimeException{

	/**
	 *
	 */
	private static final long serialVersionUID = -4137688758944857209L;

	/**
	 * http状态码
	 */
	private Integer httpStatusCode;

	private Object object;


	/**
	 * @param httpStatus http状态码
	 */
	public FeihongShopBindException(FeihongHttpStatus httpStatus) {
		super(httpStatus.getMsg());
		this.httpStatusCode = httpStatus.value();
	}

	/**
	 * @param httpStatus http状态码
	 */
	public FeihongShopBindException(FeihongHttpStatus httpStatus, String msg) {
		super(msg);
		this.httpStatusCode = httpStatus.value();
	}


	public FeihongShopBindException(String msg) {
		super(msg);
		this.httpStatusCode = HttpStatus.BAD_REQUEST.value();
	}

	public FeihongShopBindException(String msg, Object object) {
		super(msg);
		this.httpStatusCode = HttpStatus.BAD_REQUEST.value();
		this.object = object;
	}

	public Integer getHttpStatusCode() {
		return httpStatusCode;
	}

}
